﻿
using Sys;

using System.Silverlight;
using System.Silverlight.Presentation;
using System.Silverlight.Presentation.Animation;
using System;
using seh = Sys.EventHandler;
using sea = Sys.EventArgs;

namespace SBT
{
    public interface IScroller
    {
        ScrollContainer ScrollContainer { get; set; }

    }
    public class ComposedScroller : IScroller
    {

        #region IScroller Members
        private ScrollContainer m_scrollContainer;
        public ScrollContainer ScrollContainer
        {
            get
            {
                return m_scrollContainer;
            }
            set
            {
                m_scrollContainer = value;
                if ((bool)(object)m_scrollers)
                {
                    for (int i = 0; i < m_scrollers.Length; i++)
                        m_scrollers[i].ScrollContainer = value;
                }
            }
        }
        private IScroller[] m_scrollers;
        public IScroller[] Scrollers
        {
            get
            {
                return m_scrollers;
            }
            set
            {
                m_scrollers = value;
                if ((bool)(object)m_scrollers)
                {
                    for (int i = 0; i < m_scrollers.Length; i++)
                        m_scrollers[i].ScrollContainer = ScrollContainer;
                }
            }
        }

        #endregion
    }
}